<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>媒体库 - 拖拽式建站平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --sidebar-width: 240px;
            --header-height: 64px;
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --bg-color: #f5f6f7;
            --card-bg: #ffffff;
            --text-primary: #18191c;
            --text-secondary: #61666d;
            --text-muted: #9499a0;
            --border-color: #e3e5e7;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* 顶部导航栏 */
        .header {
            height: var(--header-height);
            background: var(--card-bg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .sidebar-toggle {
            margin-right: 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 18px;
        }

        .logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            color: var(--primary-color);
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .header-action {
            margin-left: 16px;
            color: var(--text-secondary);
            cursor: pointer;
            position: relative;
        }

        .header-action:hover {
            color: var(--primary-color);
        }

        .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 11px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-menu {
            display: flex;
            align-items: center;
            margin-left: 20px;
            cursor: pointer;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
        }

        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        .sidebar-menu {
            padding: 16px 0;
        }

        .menu-title {
            padding: 10px 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .menu-item:hover {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }

        .menu-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }

        .menu-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }

        /* 内容区域 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .page-title {
            font-size: 24px;
            font-weight: 600;
        }

        .page-actions .btn {
            margin-left: 10px;
        }

        /* 筛选和搜索区域 */
        .filter-bar {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 16px 20px;
            margin-bottom: 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: center;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .search-box {
            position: relative;
            flex: 1;
            min-width: 200px;
        }

        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 14px;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        .filter-group {
            display: flex;
            align-items: center;
        }

        .filter-label {
            font-size: 14px;
            color: var(--text-secondary);
            margin-right: 8px;
        }

        .filter-select {
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: white;
            font-size: 14px;
            min-width: 120px;
        }

        /* 上传区域 */
        .upload-area {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            border: 2px dashed var(--border-color);
            text-align: center;
            transition: all 0.3s ease;
        }

        .upload-area:hover {
            border-color: var(--primary-color);
        }

        .upload-icon {
            font-size: 48px;
            color: var(--primary-color);
            margin-bottom: 16px;
        }

        .upload-text {
            margin-bottom: 16px;
            color: var(--text-secondary);
        }

        .upload-hint {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 16px;
        }

        /* 媒体库区域 */
        .media-container {
            display: flex;
            flex: 1;
            gap: 20px;
        }

        /* 媒体文件列表 */
        .media-list-container {
            flex: 1;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }

        .list-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .list-title {
            font-size: 16px;
            font-weight: 500;
        }

        .view-options {
            display: flex;
            gap: 8px;
        }

        .view-option {
            padding: 6px;
            border-radius: 4px;
            cursor: pointer;
            color: var(--text-muted);
        }

        .view-option.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }

        .media-items {
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 16px;
            overflow-y: auto;
            flex: 1;
        }

        .media-item {
            background: white;
            border-radius: 6px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
        }

        .media-item:hover {
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
        }

        .media-item.selected {
            border: 2px solid var(--primary-color);
        }

        .media-thumbnail {
            height: 120px;
            background: #f9fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            position: relative;
            overflow: hidden;
        }

        .media-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .media-thumbnail i {
            font-size: 32px;
        }

        .media-type {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 10px;
        }

        .media-info {
            padding: 12px;
        }

        .media-name {
            font-weight: 500;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .media-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: var(--text-muted);
        }

        .media-size {
            font-size: 11px;
        }

        .media-date {
            font-size: 11px;
        }

        .media-checkbox {
            position: absolute;
            top: 8px;
            left: 8px;
            width: 18px;
            height: 18px;
            border-radius: 3px;
            border: 1px solid var(--border-color);
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
        }

        .media-checkbox.checked {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
        }

        .media-checkbox.checked:after {
            content: "✓";
            font-size: 12px;
        }

        /* 媒体详情面板 */
        .media-detail {
            width: 300px;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .detail-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .detail-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
        }

        .detail-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .detail-preview {
            height: 200px;
            background: #f9fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }

        .detail-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .detail-preview i {
            font-size: 48px;
            color: var(--text-muted);
        }

        .detail-meta {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .meta-item {
            display: flex;
            flex-direction: column;
        }

        .meta-label {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .meta-value {
            font-size: 14px;
            font-weight: 500;
        }

        .detail-content {
            padding: 20px;
            flex: 1;
            overflow-y: auto;
        }

        .detail-section {
            margin-bottom: 24px;
        }

        .section-title {
            font-size: 15px;
            font-weight: 500;
            margin-bottom: 12px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
        }

        .section-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .url-box {
            background: #f9fafc;
            border-radius: 4px;
            padding: 10px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
        }

        .url-text {
            flex: 1;
            font-size: 13px;
            font-family: monospace;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .url-copy {
            margin-left: 8px;
            cursor: pointer;
            color: var(--primary-color);
        }

        .dimensions {
            display: flex;
            gap: 12px;
        }

        .dimension-item {
            flex: 1;
            text-align: center;
            background: #f9fafc;
            border-radius: 4px;
            padding: 10px;
        }

        .dimension-value {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .dimension-label {
            font-size: 12px;
            color: var(--text-muted);
        }

        .detail-actions {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 10px;
        }

        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn i {
            margin-right: 6px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: #2980b9;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .btn-outline:hover {
            background: #f5f7fa;
        }

        .btn-success {
            background: var(--success-color);
            color: white;
        }

        .btn-success:hover {
            background: #219653;
        }

        .btn-danger {
            background: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background: #c0392b;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 13px;
        }

        .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            justify-content: center;
        }

        .btn-icon i {
            margin-right: 0;
        }

        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-muted);
            grid-column: 1 / -1;
        }

        .empty-state i {
            font-size: 48px;
            margin-bottom: 16px;
            color: #d1d5db;
        }

        /* 响应式设计 */
        @media (max-width: 1200px) {
            .media-items {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            }
        }

        @media (max-width: 992px) {
            .media-container {
                flex-direction: column;
            }

            .media-detail {
                width: 100%;
                height: auto;
            }

            .sidebar {
                position: fixed;
                left: -var(--sidebar-width);
                top: var(--header-height);
                bottom: 0;
                z-index: 90;
            }

            .sidebar.open {
                left: 0;
            }

            .overlay {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 80;
                display: none;
            }

            .overlay.open {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .search-box {
                min-width: auto;
            }

            .filter-group {
                width: 100%;
                justify-content: space-between;
            }

            .media-items {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
                gap: 12px;
                padding: 15px;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .page-actions {
                margin-top: 16px;
                width: 100%;
                display: flex;
                justify-content: space-between;
            }

            .page-actions .btn {
                margin-left: 0;
                flex: 1;
                margin: 0 5px;
            }

            .detail-meta {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>

<body>
    <!-- 顶部导航栏 -->
    <div class="header">
        <div class="header-left">
            <div class="sidebar-toggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-puzzle-piece"></i>
                拖拽建站后台
            </div>
        </div>

        <div class="header-right">
            <div class="header-action">
                <i class="fas fa-bell"></i>
                <span class="badge">3</span>
            </div>

            <div class="header-action">
                <i class="fas fa-envelope"></i>
                <span class="badge">5</span>
            </div>

            <div class="user-menu">
                <span>管理员</span>
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-menu">
                <div class="menu-title">主导航</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-home"></i>
                    <span>控制台</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-paint-brush"></i>
                    <span>网站管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>页面管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-th-large"></i>
                    <span>组件库</span>
                </a>

                <div class="menu-title">内容管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-newspaper"></i>
                    <span>文章管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-box"></i>
                    <span>产品管理</span>
                </a>
                <a href="#" class="menu-item active">
                    <i class="fas fa-images"></i>
                    <span>媒体库</span>
                </a>

                <div class="menu-title">用户与权限</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-shield-alt"></i>
                    <span>角色权限</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </a>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content">
            <div class="page-header">
                <h1 class="page-title">媒体库</h1>
                <div class="page-actions">
                    <button class="btn btn-outline">
                        <i class="fas fa-download"></i> 下载
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-plus"></i> 上传媒体
                    </button>
                </div>
            </div>

            <!-- 筛选和搜索区域 -->
            <div class="filter-bar">
                <div class="search-box">
                    <i class="fas fa-search search-icon"></i>
                    <input type="text" class="search-input" placeholder="搜索媒体文件...">
                </div>

                <div class="filter-group">
                    <span class="filter-label">类型:</span>
                    <select class="filter-select">
                        <option>全部类型</option>
                        <option>图片</option>
                        <option>视频</option>
                        <option>文档</option>
                        <option>音频</option>
                    </select>
                </div>

                <div class="filter-group">
                    <span class="filter-label">排序:</span>
                    <select class="filter-select">
                        <option>最新上传</option>
                        <option>名称顺序</option>
                        <option>文件大小</option>
                        <option>最常使用</option>
                    </select>
                </div>

                <button class="btn btn-outline">
                    <i class="fas fa-filter"></i> 筛选
                </button>
            </div>

            <!-- 上传区域 -->
            <div class="upload-area">
                <div class="upload-icon">
                    <i class="fas fa-cloud-upload-alt"></i>
                </div>
                <div class="upload-text">
                    <p>拖放文件到此处，或点击上传</p>
                </div>
                <div class="upload-hint">
                    支持 JPG, PNG, GIF, MP4, PDF 等格式，最大不超过 10MB
                </div>
                <button class="btn btn-primary">
                    <i class="fas fa-upload"></i> 选择文件
                </button>
            </div>

            <!-- 媒体库区域 -->
            <div class="media-container">
                <!-- 媒体文件列表 -->
                <div class="media-list-container">
                    <div class="list-header">
                        <div class="list-title">所有媒体文件</div>
                        <div class="view-options">
                            <div class="view-option active" title="网格视图">
                                <i class="fas fa-th"></i>
                            </div>
                            <div class="view-option" title="列表视图">
                                <i class="fas fa-list"></i>
                            </div>
                        </div>
                    </div>

                    <div class="media-items">
                        <div class="media-item selected">
                            <div class="media-checkbox checked"></div>
                            <div class="media-thumbnail">
                                <img src="https://placehold.co/300x200/3498db/ffffff" alt="示例图片">
                                <span class="media-type">JPG</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">banner-home.jpg</div>
                                <div class="media-meta">
                                    <span class="media-size">256 KB</span>
                                    <span class="media-date">09-05</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <img src="https://placehold.co/300x200/e74c3c/ffffff" alt="示例图片">
                                <span class="media-type">PNG</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">product-showcase.png</div>
                                <div class="media-meta">
                                    <span class="media-size">512 KB</span>
                                    <span class="media-date">09-04</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <img src="https://placehold.co/300x200/2ecc71/ffffff" alt="示例图片">
                                <span class="media-type">JPG</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">team-photo.jpg</div>
                                <div class="media-meta">
                                    <span class="media-size">1.2 MB</span>
                                    <span class="media-date">09-03</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <i class="fas fa-file-video"></i>
                                <span class="media-type">MP4</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">product-demo.mp4</div>
                                <div class="media-meta">
                                    <span class="media-size">4.7 MB</span>
                                    <span class="media-date">09-02</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <i class="fas fa-file-pdf"></i>
                                <span class="media-type">PDF</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">user-manual.pdf</div>
                                <div class="media-meta">
                                    <span class="media-size">2.1 MB</span>
                                    <span class="media-date">09-01</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <img src="https://placehold.co/300x200/f39c12/ffffff" alt="示例图片">
                                <span class="media-type">GIF</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">loading-animation.gif</div>
                                <div class="media-meta">
                                    <span class="media-size">836 KB</span>
                                    <span class="media-date">08-30</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <i class="fas fa-file-audio"></i>
                                <span class="media-type">MP3</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">background-music.mp3</div>
                                <div class="media-meta">
                                    <span class="media-size">3.5 MB</span>
                                    <span class="media-date">08-28</span>
                                </div>
                            </div>
                        </div>

                        <div class="media-item">
                            <div class="media-checkbox"></div>
                            <div class="media-thumbnail">
                                <img src="https://placehold.co/300x200/9b59b6/ffffff" alt="示例图片">
                                <span class="media-type">SVG</span>
                            </div>
                            <div class="media-info">
                                <div class="media-name">company-logo.svg</div>
                                <div class="media-meta">
                                    <span class="media-size">78 KB</span>
                                    <span class="media-date">08-25</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 媒体详情面板 -->
                <div class="media-detail">
                    <div class="detail-header">
                        <div class="detail-title">
                            <i class="fas fa-file-image"></i>
                            banner-home.jpg
                        </div>
                        <div class="detail-preview">
                            <img src="https://placehold.co/300x200/3498db/ffffff" alt="banner-home.jpg">
                        </div>
                        <div class="detail-meta">
                            <div class="meta-item">
                                <span class="meta-label">文件类型</span>
                                <span class="meta-value">JPG 图像</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">文件大小</span>
                                <span class="meta-value">256 KB</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">尺寸</span>
                                <span class="meta-value">1200 × 800</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">上传时间</span>
                                <span class="meta-value">2023-09-05</span>
                            </div>
                        </div>
                    </div>

                    <div class="detail-content">
                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-link"></i>
                                文件URL
                            </div>
                            <div class="url-box">
                                <div class="url-text">https://example.com/uploads/2023/09/banner-home.jpg</div>
                                <div class="url-copy" title="复制URL">
                                    <i class="fas fa-copy"></i>
                                </div>
                            </div>
                        </div>

                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-ruler-combined"></i>
                                尺寸信息
                            </div>
                            <div class="dimensions">
                                <div class="dimension-item">
                                    <div class="dimension-value">1200</div>
                                    <div class="dimension-label">宽度(px)</div>
                                </div>
                                <div class="dimension-item">
                                    <div class="dimension-value">800</div>
                                    <div class="dimension-label">高度(px)</div>
                                </div>
                                <div class="dimension-item">
                                    <div class="dimension-value">1.5</div>
                                    <div class="dimension-label">比例</div>
                                </div>
                            </div>
                        </div>

                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-tags"></i>
                                文件信息
                            </div>
                            <div class="detail-meta">
                                <div class="meta-item">
                                    <span class="meta-label">使用次数</span>
                                    <span class="meta-value">15</span>
                                </div>
                                <div class="meta-item">
                                    <span class="meta-label">上传者</span>
                                    <span class="meta-value">管理员</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="detail-actions">
                        <button class="btn btn-primary" style="flex: 1;">
                            <i class="fas fa-edit"></i> 编辑
                        </button>
                        <button class="btn btn-outline btn-icon">
                            <i class="fas fa-download"></i>
                        </button>
                        <button class="btn btn-outline btn-icon">
                            <i class="fas fa-trash"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 移动端遮罩层 -->
    <div class="overlay"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            // 侧边栏切换
            const sidebarToggle = document.querySelector('.sidebar-toggle');
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.overlay');

            sidebarToggle.addEventListener('click', function () {
                sidebar.classList.toggle('open');
                overlay.classList.toggle('open');
            });

            overlay.addEventListener('click', function () {
                sidebar.classList.remove('open');
                overlay.classList.remove('open');
            });

            // 媒体项选择
            const mediaItems = document.querySelectorAll('.media-item');
            const mediaCheckboxes = document.querySelectorAll('.media-checkbox');

            mediaItems.forEach(item => {
                item.addEventListener('click', function (e) {
                    if (!e.target.classList.contains('media-checkbox')) {
                        const checkbox = this.querySelector('.media-checkbox');
                        const wasChecked = checkbox.classList.contains('checked');

                        mediaItems.forEach(i => i.classList.remove('selected'));
                        mediaCheckboxes.forEach(c => c.classList.remove('checked'));

                        if (!wasChecked) {
                            this.classList.add('selected');
                            checkbox.classList.add('checked');
                        }

                        // 这里可以添加加载媒体详情的代码
                        // loadMediaDetails(this.dataset.mediaId);
                    }
                });
            });

            // 复选框选择
            mediaCheckboxes.forEach(checkbox => {
                checkbox.addEventListener('click', function (e) {
                    e.stopPropagation();
                    this.classList.toggle('checked');
                    const mediaItem = this.closest('.media-item');

                    if (this.classList.contains('checked')) {
                        mediaItem.classList.add('selected');
                    } else {
                        mediaItem.classList.remove('selected');
                    }
                });
            });

            // 视图切换
            const viewOptions = document.querySelectorAll('.view-option');

            viewOptions.forEach(option => {
                option.addEventListener('click', function () {
                    viewOptions.forEach(o => o.classList.remove('active'));
                    this.classList.add('active');

                    // 这里可以添加视图切换的代码
                    // if (this.querySelector('.fa-list')) {
                    //     switchToListView();
                    // } else {
                    //     switchToGridView();
                    // }
                });
            });

            // 复制URL功能
            const copyButtons = document.querySelectorAll('.url-copy');

            copyButtons.forEach(button => {
                button.addEventListener('click', function () {
                    const urlText = this.previousElementSibling.textContent;
                    navigator.clipboard.writeText(urlText).then(() => {
                        const originalIcon = this.innerHTML;
                        this.innerHTML = '<i class="fas fa-check"></i>';

                        setTimeout(() => {
                            this.innerHTML = originalIcon;
                        }, 2000);
                    });
                });
            });
        });
    </script>
</body>

</html>